<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <style>
    *{
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    body{
      font-size: 16px;
    }
  </style>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
<script>

  let htmlDom = document.querySelector('html');

  // 设置用于移动端适配的rem值
  let resize = function(e) {
    let width = window.innerWidth;
    console.log(width);
    let size = width / 7.5;
    htmlDom.style.fontSize = size + 'px';
  };
  // 监听窗口变化
  window.onresize = resize;
  resize();
</script>